package cn.edu.zafu.bigdata.lyq.work6;
import java.util.Scanner;
public class TestInvalidScoreException {
    public static void main(String[] args) {
        System.out.println("请输入一个0到100间的分数：");
        //从键盘输入数据，若需要连续读入采用While或者for
        Scanner scanner=new Scanner(System.in);
        int score = scanner.nextInt();

        try{
            ScoreCheck.checkScore(score);
        }catch (InvalidScoreException e){
            System.out.println("错误："+e.getMessage());
        }finally {
            scanner.close();
        }
    }
}
